﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Index.aspx.cs" Inherits="Enterprise.UI.Web.Modules.BusiTravel.Index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" type="text/css" href="../../Styles/css/gridview.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPH" runat="server">
    <div class="vDaohangtiaoHolder module">
        <div class="vDaohangtiao">
            <ul>
                <li class="first">
                    <a href="/index.aspx" title="首页">首页</a>
                </li>
                <li class="last">差旅管理
                </li>
            </ul>
        </div>
    </div>
    <Ent:HeadMenuWeb ID="HeadMenu1" runat="server">
        <Ent:HeadMenuButtonItem ButtonIcon="new.gif" ButtonName="出差申请" ButtonUrl="Edit.aspx"
            ButtonPopedom="New" ButtonUrlType="Href" />
    </Ent:HeadMenuWeb>
    <div id="p" class="easyui-panel" style="border: 0px;" fit="true"
        collapsible="false" minimizable="false" maximizable="false" closable="false">
        <div class="easyui-tabs" fit="true" plain="true">
            <div title="当前出差人员" style="padding: 10px;">
                <asp:GridView ID="GridView2" runat="server" DataKeyNames="BID" CssClass="GridViewStyle"
                    AutoGenerateColumns="False" Width="100%" AllowPaging="True" OnPageIndexChanging="GridView2_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField ItemStyle-Width="30">
                            <ItemTemplate>
                                <img src="../../Manage/Common/img/arrow_142.gif" alt="" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-Width="30" HeaderText="序号">
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="出差人" ItemStyle-Width="60px">
                            <ItemTemplate>
                                <%#Enterprise.Service.User.UserService.GetUserName((int)Eval("USERID"))%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="申请事由">
                            <ItemTemplate>
                                <%#Eval("BSUBJECT") %>
                            </ItemTemplate>
                            <ItemStyle Wrap="False" HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="BDESTINATION" HeaderText="目的地">
                            <ItemStyle HorizontalAlign="Center" Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="BSTARTIME" HeaderText="起始时间" DataFormatString="{0:yyyy-MM-dd}"
                            ItemStyle-Width="80px" />
                        <asp:BoundField DataField="BENDTIME" HeaderText="终止时间" DataFormatString="{0:yyyy-MM-dd}"
                            ItemStyle-Width="80px" />
                    </Columns>
                    <HeaderStyle CssClass="GridViewHeaderStyle" />
                    <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                    <RowStyle CssClass="GridViewRowStyle" />
                    <PagerSettings FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PageButtonCount="5"
                        PreviousPageText="上一页" />
                    <PagerStyle CssClass="GridViewPagerStyle" />
                </asp:GridView>
            </div>
            <div title="我的出差申请单" style="padding: 10px;">
                <asp:GridView ID="GridView1" runat="server" DataKeyNames="BID" CssClass="GridViewStyle"
                    AutoGenerateColumns="False" Width="100%" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField HeaderText="#" ItemStyle-Width="15">
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="申请事由">
                            <ItemTemplate>
                                <a href="Detail.aspx?Id=<%#Eval("BID") %>">
                                    <asp:Label ID="Label1" runat="server" Text='<%#Eval("BSUBJECT") %>'></asp:Label></a>
                            </ItemTemplate>
                            <ItemStyle Wrap="False" HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="BDESTINATION" HeaderText="目的地">
                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="BLINE" HeaderText="出差路线"></asp:BoundField>
                        <asp:BoundField DataField="BTICKETTYPE" HeaderText="机票类别">
                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="BSTARTIME" HeaderText="起始时间" DataFormatString="{0:yyyy-MM-dd}"
                            ItemStyle-Width="80px" />
                        <asp:BoundField DataField="BENDTIME" HeaderText="终止时间" DataFormatString="{0:yyyy-MM-dd}"
                            ItemStyle-Width="80px" />
                        <asp:TemplateField ItemStyle-Width="120" HeaderText="操作">
                            <ItemTemplate>
                               <%--  | <a href=\"Print.aspx?Id="+Eval("BID")+" \" target=\"_blank\">打印证明令</a>--%>
                                <%#(int)Eval("BSTATE")==1?"<a href=\" Close.aspx?Id="+Eval("BID")+"\" onclick=\"javascript:return confirm('确认要关闭行程吗？')\">关闭行程</a>":""+Enterprise.Service.WorkFlow.WorkFlowService.GetWorkFlowState((string)Eval("BID"),(int)Eval("BSTATE"))+"|<a href=\" Edit.aspx?Id="+Eval("BID")+"&Cmd=Revo\" onclick=\"javascript:return confirm('确认要撤销出差申请吗？ 撤销将不可恢复！')\">撤销申请</a>" %>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="GridViewHeaderStyle" />
                    <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                    <RowStyle CssClass="GridViewRowStyle" />
                    <PagerSettings FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PageButtonCount="5"
                        PreviousPageText="上一页" />
                    <PagerStyle CssClass="GridViewPagerStyle" />
                </asp:GridView>
            </div>
        </div>
    </div>
</asp:Content>
